// 分销模式

import React from 'react';
import {Form,Radio, Input,Button} from "antd";
import { UploadOutlined } from '@ant-design/icons';

const DistributionMode = () => {
  return (
    <div style={{background:'#fff',padding:'20px 30px'}}>
      <Form
        layout='horizontal'
        onFinish={()=>{
          console.log('提交了')
        }}
        labelCol={{span:3}}
        wrapperCol={{span:14}}
      >
        {/*<Form.Item shouldUpdate>*/}
        {/*  {(value) => {*/}
        {/*    console.log('1111',value.getFieldsValue().radiogroup1);*/}
        {/*    // return <pre>{JSON.stringify(form.getFieldsValue(), null, 2)}</pre>;*/}
        {/*  }}*/}
        {/*</Form.Item>*/}
        <Form.Item name="radiogroup1" label="分销启用" tooltip={ '商城分销功能开启|关闭' } >
          <Radio.Group>
            <Radio value="a">开启</Radio>
            <Radio value="b">关闭</Radio>
          </Radio.Group>
        </Form.Item>
        <Form.Item name="radio-group2" label="分销模式" tooltip={ '人人分销默认每个人都可以分销，制定人分销后台制定人开启分销' } >
          <Radio.Group>
            <Radio value="a">指定分销</Radio>
            <Radio value="b">人人分销</Radio>
            <Radio value="b">满额分销</Radio>
          </Radio.Group>
        </Form.Item>
        <Form.Item
          name="miniAmount"
          label="满额分销最低金额"
          tooltip={'满额分销满足金额开通分销权限'}
          // labelCol={{span: 4}}
          wrapperCol={{span:8}}
        >
          <Input placeholder="满额分销满足金额开通分销权限" />
        </Form.Item>
        <Form.Item name="radio-group3" label="分销关系绑定" tooltip={ '所有用户”指所有没有上级推广人的用户，“新用户”指新注册的用户' } >
          <Radio.Group>
            <Radio value="a">所有用户</Radio>
            <Radio value="b">新用户</Radio>
          </Radio.Group>
        </Form.Item>
        <Form.Item name="radio-group4" label="绑定模式" tooltip={ '永久”一次绑定永久有效，“有效期”绑定后一段时间内有效，“临时”每一次扫码都会重新绑定关系' } >
          <Radio.Group>
            <Radio value="a">永久</Radio>
            <Radio value="b">有效期</Radio>
            <Radio value="b">临时</Radio>
          </Radio.Group>
        </Form.Item>
        <Form.Item
          name="miniAmount"
          label="绑定有效期"
          tooltip={'绑定有效期（绑定后N天内有效）'}
          wrapperCol={{span:8}}
        >
          <Input placeholder="绑定有效期（绑定后N天内有效）" />
        </Form.Item>
        <Form.Item wrapperCol={{ span: 200, offset: 4 }} labelCol={{span:20}}>
          <Button type="primary" htmlType="submit" style={{width:150,height:40}}>
            <UploadOutlined /> 提交
          </Button>
        </Form.Item>
      </Form>
    </div>
  );
};

export default DistributionMode;
